<template>
    <div>
        <div class="breadcrumb-box">
            <el-breadcrumb separator-class="el-icon-arrow-right">
                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                <el-breadcrumb-item>开票信息</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="address-rece container">
            <left-nav-bar :active="active"></left-nav-bar>
            <div class="right">
                <!--        <div style="height:91px;"></div>-->
                <div class="line-ti">
                    <div>查看开票信息</div>
                </div>
                <div style="height:20px"></div>
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                    <el-form-item label="开票时间：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.create_time"></el-input>
                    </el-form-item>
                    <el-form-item label="开票金额：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.price"></el-input>
                    </el-form-item>
                    <el-form-item label="发票类型：" prop="name">
                        <el-input style="width: 520px;" readonly v-if="ruleForm.type == 0" value="个人"></el-input>
                        <el-input style="width: 520px;" readonly v-if="ruleForm.type == 1"  value="企业"></el-input>
                    </el-form-item>
                    <el-form-item label="名称：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.name"></el-input>
                    </el-form-item>
                    <el-form-item label="识别号：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.identifier"></el-input>
                    </el-form-item>
                    <el-form-item label="联系电话：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.phone"></el-input>
                    </el-form-item>
                    <el-form-item label="银行卡号：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.card_no"></el-input>
                    </el-form-item>
                    <el-form-item label="收票地址：" prop="name">
                        <el-input style="width: 520px;" readonly v-model="ruleForm.address"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="$router.go(-1)">返回</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>
        <div style="height: 200px"></div>
    </div>
</template>

<script>
import leftNavBar from "@components/leftNavBar";
import {
    getAddressList,
    getAddressRemove,
    getAddressDefaultSet,
    recordInfo,
} from "@api/user";

export default {
    components: {
        leftNavBar,
    },
    data() {
        return {
            active: 7,
            page: 1,
            limit: 20,
            addressList: [],
            addressType: "",
            ruleForm: {
                name: "",
                price: "",
                create_time: "",
                type: "",
                identifier: "",
                phone: "",
                address: "",
                card_no: "",
            },
            rules: {
                name: [
                    {
                        required: false,
                        message: "请输入信息",
                        trigger: "blur",
                    },
                ],
                region: [
                    {
                        required: false,
                        message: "请选择发票类型",
                        trigger: "change",
                    },
                ],
            },
        };
    },
    mounted() {
        this.AddressList();
    },
    methods: {
        /**
         * 获取详情
         *
         */
        AddressList() {
            let that = this;
            recordInfo(that.$route.query.id).then((res) => {
                this.ruleForm = res.data;
            });
        },
    },
};
</script>
<style >
.el-button {
    padding: 13px 97px;
    font-size: 18px;
}
.el-button--primary {
    background: #da213d;
    color: #fff;
    border-color: #da213d;
}
.el-button--primary:hover,
.el-button--primary:focus {
    background: #da213d;
    border-color: #da213d;
    color: #fff;
}
</style>
<style scoped  rel="stylesheet/scss" lang="scss" scoped>
$color: #da213d;
.address-rece {
    /*width: 70%;*/
    margin: 0 auto;
    display: flex;

    .right {
        width: 1000px;
        margin-left: 32px;

        .line-ti {
            width: 100%;
            border-bottom: 1px solid #dbdbdb;
            position: relative;
            &::before {
                position: absolute;
                left: 0;
                bottom: 0;
                width: 72px;
                height: 3px;
                content: "";
                background: $color;
            }
            > div {
                color: #da213d;
                font-size: 18px;
                font-family: MicrosoftYaHei-Bold;
                // width: 90px;
                line-height: 36px;
                font-weight: 600;
                // text-align: center;
            }
        }
    }
}
</style>
